/*	Author		: Arga
 *	Created On	: Apr 23, 2011
 *	Description	: 
 */

package team8.paacdroid.bean;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import team8.paacdroid.bean.BusRide;

public class Itinerary implements Serializable {
	private static final long serialVersionUID = -4182141811661815649L;
	private String tripName;
	private Integer tripTime;
	private ArrayList<BusRide> busRides;
	private Integer numOfBusRides;
	private Date tripDate;
	private String originText;
	private String destinationText;

	public String getTripName() {
		return tripName;
	}

	public void setTripName(String tripName) {
		this.tripName = tripName;
	}

	public Integer getTripTime() {
		return tripTime;
	}

	public void setTripTime(Integer tripTime) {
		this.tripTime = tripTime;
	}

	public void setTripTime(String tripTime) {
		this.tripTime = Integer.parseInt(tripTime);
	}

	public ArrayList<BusRide> getBusRides() {
		return busRides;
	}

	public void setBusRides(ArrayList<BusRide> busRides) {
		this.busRides = busRides;
	}

	public Integer getNumOfBusRides() {
		return numOfBusRides;
	}

	public void setNumOfBusRides(Integer numOfBusRides) {
		this.numOfBusRides = numOfBusRides;
	}

	public Date getTripDate() {
		return tripDate;
	}

	public void setTripDate(Date tripDate) {
		this.tripDate = tripDate;
	}

	public void setTripDate(String tripDate) throws ParseException {
		DateFormat df = new SimpleDateFormat("M/d/yyyy");
		this.tripDate = df.parse(tripDate);
	}

	public String getOriginText() {
		return originText;
	}

	public void setOriginText(String originText) {
		this.originText = originText;
	}

	public String getDestinationText() {
		return destinationText;
	}

	public void setDestinationText(String destinationText) {
		this.destinationText = destinationText;
	}
}
